<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>6.3 用户验证 | 引言</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../c06/s04.html" />
    
    
    <link rel="prev" href="../c06/s02.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="6.3"
        data-chapter-title="6.3 用户验证"
        data-filepath="c06/s03.md"
        data-basepath=".."
        data-revision="Fri Feb 10 2017 17:36:30 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        引言
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="c01/index.html">
            
                
                    <a href="../c01/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        1 关于Tornado
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="c01/s01.html">
            
                
                    <a href="../c01/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        1.1 Tornado是为何物
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="c01/s02.html">
            
                
                    <a href="../c01/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        1.2 Tornado与Django
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="c02/index.html">
            
                
                    <a href="../c02/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        2 初识Tornado
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="c02/s01.html">
            
                
                    <a href="../c02/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        2.1 安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="c02/s02.html">
            
                
                    <a href="../c02/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        2.2 Hello Itcast
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="c02/s03.html">
            
                
                    <a href="../c02/s03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        2.3 httpserver
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="c02/s04.html">
            
                
                    <a href="../c02/s04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        2.4 options
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="c02/s05.html">
            
                
                    <a href="../c02/s05.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        2.5 练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="c03/index.html">
            
                
                    <a href="../c03/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        3 深入Tornado
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="c03/s01.html">
            
                
                    <a href="../c03/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        3.1 Application
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="c03/s02.html">
            
                
                    <a href="../c03/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        3.2 输入
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="c03/s03.html">
            
                
                    <a href="../c03/s03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        3.3 输出
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="c03/s04.html">
            
                
                    <a href="../c03/s04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        3.4 接口与调用顺序
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="c03/s05.html">
            
                
                    <a href="../c03/s05.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        3.5 练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="c04/index.html">
            
                
                    <a href="../c04/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        4 模板
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="c04/s01.html">
            
                
                    <a href="../c04/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        4.1 静态文件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="c04/s02.html">
            
                
                    <a href="../c04/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        4.2 使用模板
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="c04/s03.html">
            
                
                    <a href="../c04/s03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        4.3 练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="c05/index.html">
            
                
                    <a href="../c05/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        5 数据库
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="c05/s01.html">
            
                
                    <a href="../c05/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        5.1 数据库
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="c05/s02.html">
            
                
                    <a href="../c05/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        5.2 练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="c06/index.html">
            
                
                    <a href="../c06/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        6 安全应用
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="c06/s01.html">
            
                
                    <a href="../c06/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        6.1 Cookie
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="c06/s02.html">
            
                
                    <a href="../c06/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        6.2 XSRF
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="6.3" data-path="c06/s03.html">
            
                
                    <a href="../c06/s03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        6.3 用户验证
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="c06/s04.html">
            
                
                    <a href="../c06/s04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.</b>
                        
                        6.4 练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7" data-path="c07/index.html">
            
                
                    <a href="../c07/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        7 异步与WebSocket
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="7.1" data-path="c07/s01.html">
            
                
                    <a href="../c07/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.1.</b>
                        
                        7.1 认识异步
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2" data-path="c07/s02.html">
            
                
                    <a href="../c07/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.</b>
                        
                        7.2 Tornado异步
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.3" data-path="c07/s03.html">
            
                
                    <a href="../c07/s03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.3.</b>
                        
                        7.3 WebSocket
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.4" data-path="c07/s04.html">
            
                
                    <a href="../c07/s04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.4.</b>
                        
                        7.4 练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8" data-path="c08/index.html">
            
                
                    <a href="../c08/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        8 部署
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.1" data-path="c08/s01.html">
            
                
                    <a href="../c08/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.1.</b>
                        
                        8.1 部署Tornado
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >引言</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="63-&#x7528;&#x6237;&#x9A8C;&#x8BC1;">6.3 &#x7528;&#x6237;&#x9A8C;&#x8BC1;</h1>
<p>&#x7528;&#x6237;&#x9A8C;&#x8BC1;&#x662F;&#x6307;&#x5728;&#x6536;&#x5230;&#x7528;&#x6237;&#x8BF7;&#x6C42;&#x540E;&#x8FDB;&#x884C;&#x5904;&#x7406;&#x524D;&#x5148;&#x5224;&#x65AD;&#x7528;&#x6237;&#x7684;&#x8BA4;&#x8BC1;&#x72B6;&#x6001;&#xFF08;&#x5982;&#x767B;&#x9646;&#x72B6;&#x6001;&#xFF09;&#xFF0C;&#x82E5;&#x901A;&#x8FC7;&#x9A8C;&#x8BC1;&#x5219;&#x6B63;&#x5E38;&#x5904;&#x7406;&#xFF0C;&#x5426;&#x5219;&#x5F3A;&#x5236;&#x7528;&#x6237;&#x8DF3;&#x8F6C;&#x81F3;&#x8BA4;&#x8BC1;&#x9875;&#x9762;&#xFF08;&#x5982;&#x767B;&#x9646;&#x9875;&#x9762;&#xFF09;&#x3002;</p>
<h2 id="authenticated&#x88C5;&#x9970;&#x5668;">authenticated&#x88C5;&#x9970;&#x5668;</h2>
<p>&#x4E3A;&#x4E86;&#x4F7F;&#x7528;Tornado&#x7684;&#x8BA4;&#x8BC1;&#x529F;&#x80FD;&#xFF0C;&#x6211;&#x4EEC;&#x9700;&#x8981;&#x5BF9;&#x767B;&#x5F55;&#x7528;&#x6237;&#x6807;&#x8BB0;&#x5177;&#x4F53;&#x7684;&#x5904;&#x7406;&#x51FD;&#x6570;&#x3002;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;@tornado.web.authenticated&#x88C5;&#x9970;&#x5668;&#x5B8C;&#x6210;&#x5B83;&#x3002;&#x5F53;&#x6211;&#x4EEC;&#x4F7F;&#x7528;&#x8FD9;&#x4E2A;&#x88C5;&#x9970;&#x5668;&#x5305;&#x88F9;&#x4E00;&#x4E2A;&#x5904;&#x7406;&#x65B9;&#x6CD5;&#x65F6;&#xFF0C;Tornado&#x5C06;&#x786E;&#x4FDD;&#x8FD9;&#x4E2A;&#x65B9;&#x6CD5;&#x7684;&#x4E3B;&#x4F53;&#x53EA;&#x6709;&#x5728;&#x5408;&#x6CD5;&#x7684;&#x7528;&#x6237;&#x88AB;&#x53D1;&#x73B0;&#x65F6;&#x624D;&#x4F1A;&#x8C03;&#x7528;&#x3002;</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ProfileHandler</span><span class="hljs-params">(RequestHandler)</span>:</span>
<span class="hljs-decorator">    @tornado.web.authenticated</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get</span><span class="hljs-params">(self)</span>:</span>
        self.write(<span class="hljs-string">&quot;&#x8FD9;&#x662F;&#x6211;&#x7684;&#x4E2A;&#x4EBA;&#x4E3B;&#x9875;&#x3002;&quot;</span>)
</code></pre>
<h2 id="getcurrentuser&#x65B9;&#x6CD5;">get_current_user()&#x65B9;&#x6CD5;</h2>
<p>&#x88C5;&#x9970;&#x5668;@tornado.web.authenticated&#x7684;&#x5224;&#x65AD;&#x6267;&#x884C;&#x4F9D;&#x8D56;&#x4E8E;&#x8BF7;&#x6C42;&#x5904;&#x7406;&#x7C7B;&#x4E2D;&#x7684;self.current_user&#x5C5E;&#x6027;&#xFF0C;&#x5982;&#x679C;current_user&#x503C;&#x4E3A;&#x5047;&#xFF08;None&#x3001;False&#x3001;0&#x3001;&quot;&quot;&#x7B49;&#xFF09;&#xFF0C;&#x4EFB;&#x4F55;GET&#x6216;HEAD&#x8BF7;&#x6C42;&#x90FD;&#x5C06;&#x628A;&#x8BBF;&#x5BA2;&#x91CD;&#x5B9A;&#x5411;&#x5230;&#x5E94;&#x7528;&#x8BBE;&#x7F6E;&#x4E2D;login_url&#x6307;&#x5B9A;&#x7684;URL&#xFF0C;&#x800C;&#x975E;&#x6CD5;&#x7528;&#x6237;&#x7684;POST&#x8BF7;&#x6C42;&#x5C06;&#x8FD4;&#x56DE;&#x4E00;&#x4E2A;&#x5E26;&#x6709;403&#xFF08;Forbidden&#xFF09;&#x72B6;&#x6001;&#x7684;HTTP&#x54CD;&#x5E94;&#x3002;</p>
<p>&#x5728;&#x83B7;&#x53D6;self.current_user&#x5C5E;&#x6027;&#x7684;&#x65F6;&#x5019;&#xFF0C;tornado&#x4F1A;&#x8C03;&#x7528;get_current_user()&#x65B9;&#x6CD5;&#x6765;&#x8FD4;&#x56DE;current_user&#x7684;&#x503C;&#x3002;&#x4E5F;&#x5C31;&#x662F;&#x8BF4;&#xFF0C;<strong>&#x6211;&#x4EEC;&#x9A8C;&#x8BC1;&#x7528;&#x6237;&#x7684;&#x903B;&#x8F91;&#x5E94;&#x5199;&#x5728;get_current_user()&#x65B9;&#x6CD5;&#x4E2D;&#xFF0C;&#x82E5;&#x8BE5;&#x65B9;&#x6CD5;&#x8FD4;&#x56DE;&#x975E;&#x5047;&#x503C;&#x5219;&#x9A8C;&#x8BC1;&#x901A;&#x8FC7;&#xFF0C;&#x5426;&#x5219;&#x9A8C;&#x8BC1;&#x5931;&#x8D25;&#x3002;</strong></p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ProfileHandler</span><span class="hljs-params">(RequestHandler)</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get_current_user</span><span class="hljs-params">(self)</span>:</span>
        <span class="hljs-string">&quot;&quot;&quot;&#x5728;&#x6B64;&#x5B8C;&#x6210;&#x7528;&#x6237;&#x7684;&#x8BA4;&#x8BC1;&#x903B;&#x8F91;&quot;&quot;&quot;</span>
        user_name = self.get_argument(<span class="hljs-string">&quot;name&quot;</span>, <span class="hljs-keyword">None</span>)
        <span class="hljs-keyword">return</span> user_name 

<span class="hljs-decorator">    @tornado.web.authenticated</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get</span><span class="hljs-params">(self)</span>:</span>
        self.write(<span class="hljs-string">&quot;&#x8FD9;&#x662F;&#x6211;&#x7684;&#x4E2A;&#x4EBA;&#x4E3B;&#x9875;&#x3002;&quot;</span>)
</code></pre>
<h2 id="loginurl&#x8BBE;&#x7F6E;">login_url&#x8BBE;&#x7F6E;</h2>
<p>&#x5F53;&#x7528;&#x6237;&#x9A8C;&#x8BC1;&#x5931;&#x8D25;&#x65F6;&#xFF0C;&#x5C06;&#x7528;&#x6237;&#x91CD;&#x5B9A;&#x5411;&#x5230;login_url&#x4E0A;&#xFF0C;&#x6240;&#x4EE5;&#x6211;&#x4EEC;&#x8FD8;&#x9700;&#x8981;&#x5728;Application&#x4E2D;&#x914D;&#x7F6E;login_url&#x3002;</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">LoginHandler</span><span class="hljs-params">(RequestHandler)</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get</span><span class="hljs-params">(self)</span>:</span>
        <span class="hljs-string">&quot;&quot;&quot;&#x5728;&#x6B64;&#x8FD4;&#x56DE;&#x767B;&#x9646;&#x9875;&#x9762;&quot;&quot;&quot;</span>
        self.write(<span class="hljs-string">&quot;&#x767B;&#x9646;&#x9875;&#x9762;&quot;</span>)

app = tornado.web.Application(
    [
        (<span class="hljs-string">r&quot;/&quot;</span>, IndexHandler),
        (<span class="hljs-string">r&quot;/profile&quot;</span>, ProfileHandler),
        (<span class="hljs-string">r&quot;/login&quot;</span>, LoginHandler),
    ],
    <span class="hljs-string">&quot;login_url&quot;</span>:<span class="hljs-string">&quot;/login&quot;</span>
)
</code></pre>
<h4 id="&#x60F3;&#x4E00;&#x60F3;&#xFF0C;&#x5B8C;&#x6210;&#x767B;&#x9646;&#x64CD;&#x4F5C;&#x540E;&#x5E94;&#x8BE5;&#x8FDB;&#x5165;&#x54EA;&#x4E2A;&#x9875;&#x9762;&#xFF1F;">&#x60F3;&#x4E00;&#x60F3;&#xFF0C;&#x5B8C;&#x6210;&#x767B;&#x9646;&#x64CD;&#x4F5C;&#x540E;&#x5E94;&#x8BE5;&#x8FDB;&#x5165;&#x54EA;&#x4E2A;&#x9875;&#x9762;&#xFF1F;</h4>
<p><img src="../images/login_url_next.png" alt="&#x8DF3;&#x8F6C;&#x540E;&#x7684;login_url"></p>
<p>&#x5728;login_url&#x540E;&#x9762;&#x8865;&#x5145;&#x7684;next&#x53C2;&#x6570;&#x5C31;&#x662F;&#x8BB0;&#x5F55;&#x7684;&#x8DF3;&#x8F6C;&#x81F3;&#x767B;&#x5F55;&#x9875;&#x9762;&#x524D;&#x7684;&#x6240;&#x5728;&#x4F4D;&#x7F6E;&#xFF0C;&#x6240;&#x4EE5;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;next&#x53C2;&#x6570;&#x6765;&#x5B8C;&#x6210;&#x767B;&#x9646;&#x540E;&#x7684;&#x8DF3;&#x8F6C;&#x3002;</p>
<p>&#x4FEE;&#x6539;&#x767B;&#x9646;&#x903B;&#x8F91;&#xFF1A;</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">LoginHandler</span><span class="hljs-params">(RequestHandler)</span>:</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get</span><span class="hljs-params">(self)</span>:</span>
        <span class="hljs-string">&quot;&quot;&quot;&#x767B;&#x9646;&#x5904;&#x7406;&#xFF0C;&#x5B8C;&#x6210;&#x767B;&#x9646;&#x540E;&#x8DF3;&#x8F6C;&#x56DE;&#x524D;&#x4E00;&#x9875;&#x9762;&quot;&quot;&quot;</span>
        next = self.get_argument(<span class="hljs-string">&quot;next&quot;</span>, <span class="hljs-string">&quot;/&quot;</span>)
        self.redirect(next+<span class="hljs-string">&quot;?name=logined&quot;</span>)
</code></pre>
<p>&#x7528;&#x6237;&#x8BBF;&#x95EE;&#x7684;&#x7F51;&#x5740;&#x987A;&#x5E8F;&#xFF1A;</p>
<p><img src="../images/login_return_pre.png" alt="&#x8DF3;&#x8F6C;&#x987A;&#x5E8F;"></p>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../c06/s02.html" class="navigation navigation-prev " aria-label="Previous page: 6.2 XSRF"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../c06/s04.html" class="navigation navigation-next " aria-label="Next page: 6.4 练习"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
